<template>
    <div class="box">
       <!-- 系统管理  -->
       <div class="wrapper">
         <p>
            <span class="active">平台设置</span> /
            <span>资源配置</span>
        </p>
         <div class="content">
            <div class="title">
                <span class="newadd">新增资源</span><el-icon><ArrowDown /></el-icon>
            </div>
            <table width="700" border="1px" rules="rows" cellspacing="0" v-for="item in menuList.slice(4,5)" :key="item">
                <tr style="background-color: #f5f5f5;font-size: 12px;color: gray;">
                    <td width="60px">ID</td>
                    <td>NAME</td>
                    <td>UPI</td>
                    <td>METHOD</td>
                    <td>Dis ABLED</td>
                    <td>OPTION</td>
                </tr>
                <tr v-for="item in item.children" :key="item">
                    <td>{{item.id}}</td>
                    <td>{{ item.name }}</td>
                    <td>{{item.path}}</td>
                    <td>POST</td>
                    <td>FALSE</td>
                    <td>
                        <el-icon color="blue" size="18px"><Edit /></el-icon>
                        <el-icon color="#f70" size="18px"><CircleCloseFilled /></el-icon>
                        <el-icon color="yellow" size="18px"><DocumentRemove /></el-icon>
                    </td>
                </tr>
            </table>
         </div>
       </div>
    </div>
</template>
<style scoped lang="scss">
.wrapper{
    margin-left: 25px;
}
.content{
    border: 1px solid #ececec;
    margin-top: 10px;
    
    box-sizing: border-box;
    box-shadow: 3px 3px 3px rgb(199, 199, 199);
}
table{
    border: 0;
    border-top: 1px;
    width: 748px;
    background-color: #fff;
    border-color: #e0e0e0;
    font-size: 14px;
    text-align: center;
    color: rgb(90, 90, 90);
    tr{
       td{
        padding: 15px 0;
       }
    }
}
.wrapper{
    width: 750px;
    margin-top:10px;
    .title{
            padding: 15px 30px 15px 50px;
            display: flex;
            align-items: center;
            background-color: #fff;
            justify-content: space-between;
        }
        .newadd{
            display: block;
            padding: 3px 6px;
            color: white;
            border-radius: 5px;
            font-size: 14px;
            width: 60px;
            background-color: rgb(255, 171, 98);
            cursor: pointer;
        }
    }

span{
    color: rgb(77, 77, 77);
}
.active{
    font-size: 18px;
    color: black;
}
</style>
<script setup>
import { ref } from 'vue';
// import { GetStaff } from '@/api/auth.js';
import {MenuView,GetStaff} from "@/api/index.js"
// 搜索的条件 searchForm
const searchForm = ref({});
// 员工列表数据 staffList
const staffList = ref([]);
// 资源配置
const menuList = ref([])
// 获取员工列表的方法
const getStaff = () => {
    GetStaff(searchForm.value).then(res => {
        staffList.value = res.data.data;
        console.log(staffList.value);
    })
}
getStaff()
const list = ()=>{
    MenuView().then(res=>{
        menuList.value = res.data.list
        console.log(menuList.value);
    })
}
list()
</script>